package com.gupao.gupaoeduvippattern.javaBase.day02.test1;

import org.junit.jupiter.api.Test;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

public class Demo01 {


    @Test
    public void test4(){
        StringBuilder sb = new StringBuilder();
        sb.append("test1:1 or");
        sb.delete(1, 2);
        sb.substring(2);
        System.out.println(sb.toString());
    }


    @Test
    public void test3(){
        Map<String, Object> map = new HashMap<>();
        System.out.println(map.put("语文", 100));
        System.out.println(map.put("数学", 112));
        System.out.println(map.put("英语", 100));

        System.out.println(map.remove("数学"));

        System.out.println(map);

    }


    @Test
    public void test2(){
        // 共13位的毫秒数
        long l = System.currentTimeMillis();
        System.out.println("距离"+ l/1000/3600/24 +"天，距离"+ l +"秒");

    }


    @Test
    public void test1(){
        Set set = new HashSet();
        System.out.println(set.add("a"));
        System.out.println(set.add("a"));
        System.out.println(set.add("b"));
        System.out.println(set.add("b"));

        System.out.println(set);
        System.out.println(set.size());

    }

}
